package peer.applet;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import peer.player.Player;




public class CreatNewPlayer implements Runnable{
	Thread t;
	Player player;
	Shell parent;
	boolean isCreat=false;
	Display display;
	static int shellWidth=400;
    static int shellHeigth=300;
    AppletPlayer applet;
    String media;
    boolean autoPlay=false;
	public CreatNewPlayer(boolean autoPlay,String media,AppletPlayer applet,Display display,Shell parent,int shellWidth,int shellHeigth){
		this.autoPlay=autoPlay;
		this.media=media;
		this.applet=applet;
		CreatNewPlayer.shellWidth=shellWidth;
		CreatNewPlayer.shellHeigth=shellHeigth;
		this.display=display;
		this.parent=parent;
		t=new Thread(this);
		t.start();
	}
	
	public void run() {
		player=new Player(autoPlay,media,applet,"",display,parent,shellWidth,shellHeigth);
	}
	
	Player getPlayer(){
		return player;
	}
	
}